import curses

def main(stdscr):
    stdscr.clear()
    stdscr.addstr(0, 0, "Hello, curses!")
    stdscr.refresh()

    while True:
        ch = stdscr.getch()
        if ch == ord('q'):  # Exit on 'q'
            break1

curses.wrapper(main)